package ranklist;

import java.util.*;
import java.util.logging.Logger;

import org.bukkit.ChatColor;
import org.bukkit.command.*;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;

public class Ranklist extends JavaPlugin {
	public final Logger logger = Logger.getLogger("Minecraft");
	
	
	@Override
	public void onEnable() {
		PluginDescriptionFile pdfFile = this.getDescription();
		this.logger.info(pdfFile.getName() + pdfFile.getVersion() + "Enabled");
		this.saveDefaultConfig();
	}
	@Override
	public void onDisable() {
		PluginDescriptionFile pdfFile = this.getDescription();
		this.logger.info(pdfFile.getName() + pdfFile.getVersion() + "Disabled");
		this.saveConfig();
	}
	


	public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
		if (cmd.getName().equalsIgnoreCase("ranks"));
			if (args.length == 0);
			List<String> s = Ranklist.this.getConfig().getStringList("ranks");
			List<String> d = Ranklist.this.getConfig().getStringList("donator ranks");
			for (String ranks : s)
				sender.sendMessage(ChatColor.translateAlternateColorCodes('&', ranks));
			for (String dranks : d)
				sender.sendMessage(ChatColor.translateAlternateColorCodes('&', dranks));
			if (args.length == 1)
				if (args.equals("reload"))
					this.reloadConfig();
				sender.sendMessage(ChatColor.GREEN + "Config Reloaded");
		{
	return true;
}
	}
}
